#include <stdio.h>
#include "arithmetric.h"
#include "string.h"

int main(int argc, const char args[])
{
    operator*ptr_ops = NULL;

    char ops[1024];
    printf("输入计算表达式：\n");
    scanf("%s", ops);
    init_operator(ops, strlen(ops), &ptr_ops);
    if (ptr_ops == NULL)
    {
        printf("表达式不正确，无法运算\n");
    }
    else
    {
        int val = get_value(ptr_ops);
        printf("%s = %d", ops, val);
    }

    return 0;
}